﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace RuiXinCoffee.Utils
{
    //基础异常类
    public class RuiXinException : Exception
    {
        public RuiXinException() : base() { }
        public RuiXinException(string message) : base(message) { }
        public RuiXinException(string message, Exception innerException) : base(message, innerException) { }
    }
    
    //数据库异常
    public class DatabaseException : RuiXinException
    {
        public DatabaseException() : base("数据库操作发生错误") { }
        public DatabaseException(string message) : base(message) { }
        public DatabaseException(string message, Exception innerException) : base(message, innerException) { }
    }
    
    //图片处理异常
    public class ImageProcessException : RuiXinException
    {
        public ImageProcessException() : base("图片处理发生错误") { }
        public ImageProcessException(string message) : base(message) { }
        public ImageProcessException(string message, Exception innerException) : base(message, innerException) { }
    }
    
    //业务逻辑异常
    public class BusinessException : RuiXinException
    {
        public BusinessException() : base("系统发生错误") { }
        public BusinessException(string message) : base(message) { }
        public BusinessException(string message, Exception innerException) : base(message, innerException) { }
    }
    
    //用户操作异常
    public class UserOperationException : RuiXinException
    {
        public UserOperationException() : base("用户操作错误") { }
        public UserOperationException(string message) : base(message) { }
        public UserOperationException(string message, Exception innerException) : base(message, innerException) { }
    }
}
